package com.chixing.Mapper;

import com.chixing.pojo.Camera;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface CameraMapper {
    @Select("select * from camera where id = #{id}")
    Camera queryById(String id);
    @Select("select * from camera Limit #{start},#{pageSize}")
    List<Camera> queryAllByLimit(int start, int pageSize);
    @Select("select * from camera where brand = #{brand} Limit #{start},#{pageSize}")
    List<Camera> queryByBrandPage(String brand,int start, int pageSize);
    @Select("select * from camera where name like concat('%',#{name},'%')")
    List<Camera> queryListByName(String name);

}
